<% @page_title = "Add a User" -%>
<%= error_messages_for 'user' %>
<%= form_tag %>

<table>
	<tr>
		<td> User Name :</td>
		<td> <%= text_field("user", "username") %></td>
	</tr>
	<tr>
		<td> Password :</td>
		<td> <%= password_field("user", "txtpassword") %></td>
	</tr>
	<tr>
		<td> email :</td>
		<td> <%= text_field("user", "email") %></td>
	</tr>
	<tr>
		<td> Company :</td>
		<td> <%= 
			@companies = Company.find(:all, :order => "name")
			collection_select(:user, :company_id, @companies, :id, :name) 
			%></td>
	</tr>
	<tr>
		<td> Default Profile :</td>
		<td> <%= 
			@profiles = Profile.find(:all)
			collection_select(:user, :profile_id, @profiles, :id, :theame) 
			%></td>
	</tr>
	<tr>
		<td></td>
		<td> <input type="submit" value="Add User" /></td>
	</tr>
</table>
<%= end_form_tag %>

